import java.util.Scanner;

public class Work_3 {
    public static void main(String[] args) {
        System.out.println("已知数组int[] arr = {19, 28, 37, 46, 50}");
        Scanner reader = new Scanner(System.in);
        System.out.println("请输入一个数据：");
        int a = reader.nextInt();
        Indexes(a);
    }
    public static void Indexes(int a) {
        int[] arr = {19, 28, 37, 46, 50};
        for (int i = 0; i < 5; i++) {
            if (arr[i] == a) {
                System.out.println(a + "的索引值为" + i);
            }
        }
    }
}